<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            display: flex;
            height: 100vh;
            width: 100vw;
            flex-direction: column;
            justify-content: space-between;
        }

        body .header {
            height: 3em;
            background-color: red;
        }

        body .footer {
            height: 3em;
            background-color: red;
        }

        body .center {
            flex-grow: 1;
            display: flex;
            justify-content: space-around;
        }

        .center div {
            background-clip: content-box;
            box-sizing: border-box;
            padding: 10px;
        }

        .center div:first-child,
        div:last-child {
            flex-basis: 200px;
            background-color: red;
        }

        .center div:nth-child(2) {
            background-color: green;
            flex: 1;
        }
    </style>
</head>

<body>
    <div class="header">header</div>
    <div class="center">
        <div>left</div>
        <div>center</div>
        <div>right</div>

    </div>
    <div class="footer">footer</div>
</body>

</html>